|
In compiler theory of computer science, A Greatest common divisor Test is the test used in study of loop optimization and loop dependence analysis to test the dependency between loop statements. Whenever a sequential loop like for loop is made to be parallel so that it can be executed on more than one processor like in case of grid computing or cluster computing then certain dependencies are checked to know whether this loop can be parallelized or not: for instance, testing the flow (true) dependence of a statement. According to this test, by comparing the indices of two arrays present in two or more statements, it can be calculated whether it is legal to parallelize the loop or not. ==Theorem== A linear Diophantine equation a1 *x1 + a2 *x2 +... + an *xn =c has an integer solution x1, x2,..., xn iff GCD (a1,a2,.., an) divides c. E.g. 2 *x1 -2 *x2 =1 GCD(2,-2) =2, 2 cannot divide 1. So, there is no integer solution for the equation above. 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「GCD test」の詳細全文を読む スポンサード リンク
|